#include "../include/Talent.hh"
#include "../include/Character.hh"

void Talent::applyBonuses(Character& character, int layer) const {
    character.attributes.health += bonuses.health * pow(3, layer - 1);
    character.maxHealth += bonuses.health * pow(3, layer - 1); // Increase max health
    character.attributes.attack += bonuses.attack * pow(3, layer - 1);
    character.attributes.defense += bonuses.defense * pow(3, layer - 1);
    character.attributes.critChance += bonuses.critChance * pow(3, layer - 1);
    character.attributes.critDamage += bonuses.critDamage * pow(3, layer - 1);
    character.attributes.speed += bonuses.speed * pow(3, layer - 1);
    character.attributes.armor += bonuses.armor * pow(3, layer - 1);
    character.attributes.penetration += bonuses.penetration * pow(3, layer - 1);
    character.attributes.damageMultiplier += bonuses.damageMultiplier - 1.0f * pow(3, layer - 1);
}